import { Pagination } from "@arco-design/web-vue";
interface PageProps {
  size: number;
  total: number;
  current: number;
  align: "left" | "center" | "right";
  currentChange: (val: number) => void;
}
export function PaginationRender(props: PageProps) {
  const alignMap = {
    left: "flex mt-4 justify-start",
    center: "flex mt-4 justify-center",
    right: "flex mt-4 justify-end",
  };
  return (
    <div class={alignMap[props.align]}>
      <Pagination
        size="small"
        current={props.current}
        showTotal
        total={props.total}
        pageSize={props.size}
        onChange={(val) => {
          props.currentChange(val);
        }}
      ></Pagination>
    </div>
  );
}
